import request from "../index";

export default class FormRequest {
  // 获取表单信息
  public static getForm(params) {
    return request({
      url: "/form",
      params,
      method: "get",
    });
  }

  // 创建表单
  public static addForm(data) {
    return request({
      url: "/form",
      data,
      method: "post",
    });
  }

  // 修改表单信息
  public static editForm(data) {
    return request({
      url: "/form",
      data,
      method: "put",
    });
  }

  // 删除表单
  public static deleteForm(params) {
    return request({
      url: "/form",
      params,
      method: "delete",
    });
  }
  // 获取表单列表
  public static getFormList(params) {
    return request({
      url: "/form/list",
      params,
      method: "get",
    });
  }
}
